<?php
namespace app\validate;

use think\Validate;

class CheckTask extends Validate
{

    protected $rule =   [
        'title'  => 'require|length:1,50',
        'e_title'  => 'require|length:1,50',
        'intro'  => 'require|length:1,50',
        'e_intro'  => 'require|length:1,50',
        'icon'  => 'require',
        'type'  => 'require',
        'range'  => 'require',
        'integral'  => 'require|number',
        'num'  => 'require|number',
        'upper_limit'  => 'require|number',
    ];

    protected $message  =   [
        'title.require' => '请输入任务标题！',
        'title.length' => '任务标题在1-50个字符！',
        'e_title.require' => '请输入Title(EN)！',
        'e_title.length' => 'Title(EN)在1-50个字符！',
        'intro.require' => '请输入任务简介！',
        'intro.length' => '任务简介在1-50个字符！',
        'e_intro.require' => '请输入Intro(EN)！',
        'e_intro.length' => 'Intro(EN)在1-50个字符！',
        'icon.require' => '请选择任务图标！',
        'type.require' => '请选择任务类型！',
        'range.require' => '请选择周期范围！',
        'integral.require' => '请填写奖励积分！',
        'integral.number' => '奖励积分为数字！',
        'num.number' => '奖励次数为数字！',
        'num.require' => '请填写奖励次数！',
        'upper_limit.require' => '请填写积分上限！',
        'upper_limit.number' => '积分上限为数字！',
    ];

}